<template>
    <div id="myAnchor">111</div>
    <van-button @click="getUserCode">点击</van-button>
</template>

<script setup="home">
// import { getCurrentInstance, reactive, ref } from "vue";
// import dayjs from "dayjs";
// import { authLogin, getAppList, getInfo, logout } from "../../api/auth/index";
// import { getToken, setAuthCache } from "../utils/auth";
import { ref } from "vue";
import { useRouter } from "vue-router";
// import { browser } from "../utils/appx";
// import 'vant/es/toast/style';

const router = useRouter();

// const data = reactive({
//   appCode: undefined,
//   loading: true,
//   productionVal: 11.4,
//   scheduleVal: 4,
//   dataTimeVal: dayjs().diff("2022-6-28", "day"),
//   userInfo: {},
// });

// const pageIsShow = ref(true);
// const applicationList = ref([]);
// const baseUrl = ref(import.meta.env.VITE_APP_PUBLIC_URL);
// console.log("获取授权码：：", );

//获取APP授权码
function getUserCode() {
    fz.util.getAuthoizationCode({
        appId: import.meta.env.VITE_APP_ID,
        onSuccess: function (res) {
            //获取到返回的授权码 res.code
            alert(111)
        },
        onFail: function (err) {
            alert(111)
        }
    })
}


</script>